package demo2;

public class Game {
    public String gameName = "慌友";
    public int passWord = 123;
    public void func(String gameName,int passWord){
       if(!this.gameName.equals(gameName)) {
           throw new GameNameException("你输入的游戏名错误..." + gameName);
       }
        if(this.passWord != passWord ) {
            throw new PassWordException("你输入的游戏密码错误..." + passWord);
        }
        System.out.println("登录成功....");
    }
}
